Skip to content

Feature: <Ethernet> Ethernet config rework (#12)#39

Draft
mcbridematt wants to merge 15 commits intordkcentral:developfrom
mcbridematt:ethernet-config-rework
Draft

Feature: <Ethernet> Ethernet config rework (#12)#39
mcbridematt wants to merge 15 commits intordkcentral:developfrom
mcbridematt:ethernet-config-rework

Conversation

@mcbridematt
Copy link
Contributor

@mcbridematt mcbridematt commented Feb 3, 2026

Implements #12

Until now, meta-rdk-bsp-arm has used a PSM config file for the full (8+2) Ten64 board. Boards that are not Ten64's had their Ethernet interfaces adjusted to look like one (Highest priority WAN -> eth8, second highest eth6).

We now try to do this in a more RDK way by shipping PSM configs for each supported machine, with a fallback "default" suitable for machines with only two interfaces (LAN + WAN).
The appropriate PSM default config is copied on first boot before PsmSsp starts, avoiding the need to manipulate PSM config from bitbake recipes and/or bake separate rootfs images for each development board.

We also want to support variations of configurations for certain use cases (like erouter0 backwards compatibility)

As part of this, any hard coding of WAN interfaces (be it eth6, eth8 or erouter0) should be avoided.

Implemented so far:

  • Proof of concept for QEMU and Ten64 (both 4+2/RDK and 8+2 boards), MYD-LR3568 and Raspberry Pi CM4 router board (52Pi)

Still to be done:

Profiles

The following profiles are currently defined:

  • default (Two Ethernet ports, e.g QEMU, RK3568, Raspberry Pi CM4 router board): eth0 LAN, eth1 WAN, No cellular WAN
  • Ten64-4x1G port / RDK developer edition "LAN4" copper WAN / SFP 1 Fiber WAN + Cellular
  • Ten64-Full / Ten64 retail version / GE6 copper WAN, XG0 fiber WAN + Cellular

At boot, the system will copy the profile file to the default PSM database location (/usr/ccsp/config/bbhm_def_cfg.xml) based on the machine name (as determined from /sys/firmware/devicetree/base/compatible).

If /usr/ccsp/config/bbhm_def_cfg.xml is already present on the disk / image, no files will be copied over

In the future I would like to generate these programmatically based on the hardware that is detected, this is something we can do later.

erouter0 compatibility

Adding the DISTRO_FEATURE keyword erouter0_compatibility will modify the initial PSM config to set erouter0 as the WAN interface name

This config is for a simple, two interface setup
(eth0 LAN, eth1 WAN), well suited for use in QEMU.
This should be controlled by PSM / TR-181 settings instead.
…faces

WAN Manager may not consider devices as available unless the
interface has been brought up.
The required steps are now performed by pre-start steps
for PsmSsp and CcspEthAgent
This is to avoid any hardcoded interface references.
The Ethernet agent calls this function to determine if an
Ethernet interface in Device.Ethernet.Interface.X is
the WAN facing one.

Originally developed by mahanteshchitt <[email protected]>.
in rdkcentral@6d451ef
This invocation (mkdir -p /rdklogs/logs) will fail under a read-only
rootfs environment. We already create and mount this folder earlier
in the boot process.
This uses:
SFP1 (eth5) as 1st priority WAN
LAN4 (eth2) as 2nd priority WAN
+ cellular
On a system that uses erouter0, we need to tell ethagent to monitor it instead of the original interface name (like eth1)
@mcbridematt mcbridematt force-pushed the ethernet-config-rework branch from 3195548 to 9dc31ab Compare February 25, 2026 03:15
}
#else
- #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_)
+ #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_) || defined(_PLATFORM_GENERICARM_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TURRIS should be eliminated is not supported anymore

install -m 755 ${S}/scripts/bbhm_patch.sh ${D}/usr/ccsp/psm/bbhm_patch.sh
install -d ${D}/usr/ccsp/machine_configs
cp ${WORKDIR}/bbhm_def_cfg_ten64.xml ${D}/usr/ccsp/machine_configs/traverse_ten64.xml
cp ${WORKDIR}/bbhm_def_cfg_ten64-4.xml ${D}/usr/ccsp/machine_configs/traverse_ten64-4.xml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a more generic name for the configuration


FILES:${PN}:append = " /usr/ccsp/config \
/usr/ccsp/machine_configs \
/usr/ccsp/machine_configs/traverse_ten64.xml \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use generic name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Feature: <PSM> Detect and modify PSM for hardware (Ethernet ports)

2 participants